- 
                Notifications
    
You must be signed in to change notification settings  - Fork 37
 
Refactor Errors for DataHub Validation #993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
        
          
                ext/openAPI/components/schemas/errors/common/TemporaryNotAvailableError.yaml
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                ext/openAPI/components/schemas/errors/common/RequestBodyMissingError.yaml
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                ext/openAPI/components/schemas/errors/validation/EmptyFieldValidationError.yaml
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                ext/openAPI/components/schemas/errors/validation/InvalidIdentifierValidationError.yaml
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                hivemq-edge-openapi/openapi/components/schemas/errors/validation/ValidationError.yaml
          
            Show resolved
            Hide resolved
        
              
          
                hivemq-edge-openapi/openapi/components/schemas/errors/validation/ValidationError.yaml
          
            Show resolved
            Hide resolved
        
              
          
                ext/openAPI/components/schemas/errors/validation/ValidationErrors.yaml
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                ...edge-openapi/openapi/components/schemas/errors/datahub/AtMostOneFunctionValidationError.yaml
          
            Show resolved
            Hide resolved
        
              
          
                ...edge-openapi/openapi/components/schemas/errors/datahub/AtMostOneFunctionValidationError.yaml
          
            Show resolved
            Hide resolved
        
              
          
                ext/openAPI/components/schemas/errors/datahub/BehaviorPolicyAlreadyPresentError.yaml
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                ext/openAPI/components/schemas/errors/datahub/BehaviorPolicyCreationFailureError.yaml
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                ext/openAPI/components/schemas/errors/datahub/BehaviorPolicyNotFoundError.yaml
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                ext/openAPI/components/schemas/errors/validation/EmptyFieldValidationError.yaml
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                ext/openAPI/components/schemas/errors/validation/InvalidFieldLengthValidationError.yaml
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                ext/openAPI/components/schemas/errors/validation/InvalidFieldValueValidationError.yaml
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                ext/openAPI/components/schemas/errors/validation/MissingFieldValidationError.yaml
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                ext/openAPI/components/schemas/errors/validation/UnsupportedFieldValidationError.yaml
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                ext/openAPI/paths/api_v1_data-hub_behavior-validation_policies.yaml
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                ext/openAPI/components/schemas/errors/datahub/BehaviorPolicyAlreadyPresentError.yaml
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                ...edge-openapi/openapi/components/schemas/errors/datahub/AtMostOneFunctionValidationError.yaml
          
            Show resolved
            Hide resolved
        
      There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks pretty good.
I've closed all the outstanding issues, we will revisit problems with individual errors when I deal with them in the frontend (if I'm nt, no need to over-engineering)
There are two issues:
- rename ApiError to 
DataHubApiError(very important) - rename all ApiError-related schemas to end with 
ProblemDetailinstead ofErrororErrors 
        
          
                ...ge-openapi/openapi/components/schemas/errors/datahub/BehaviorPolicyCreationFailureError.yaml
          
            Show resolved
            Hide resolved
        
              
          
                hivemq-edge-openapi/openapi/components/schemas/errors/datahub/DataPolicyInvalidErrors.yaml
          
            Show resolved
            Hide resolved
        
              
          
                ...mq-edge-openapi/openapi/components/schemas/errors/datahub/BehaviorPolicyValidationError.yaml
          
            Show resolved
            Hide resolved
        
      
          
 Not all API errors are DataHub errors. The DataHub validation reuses some shared errors. That's why I avoided prefixing with DataHub. I suggest we have a call discussing these issues.  | 
    
b5769cd    to
    f7f0f0c      
    Compare
  
    46de359    to
    fcdf0ad      
    Compare
  
    
          Coverage Report
 
  | 
    
4f610d0    to
    dc0e924      
    Compare
  
    8168bc7    to
    16ae985      
    Compare
  
    f0f8576    to
    86e8c80      
    Compare
  
    fcff24f    to
    2c0c503      
    Compare
  
    There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work :)
2c0c503    to
    2f53465      
    Compare
  
    2f53465    to
    2dc993d      
    Compare
  
    This reverts commit 539072a.
bc9f3ea    to
    35d9cce      
    Compare
  
    
https://hivemq.kanbanize.com/ctrl_board/57/cards/29914/details/